<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Utils\QueryUtil;


class CreateTableSundryAbout extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('notepads', function (Blueprint $table) {
            $table->id();
            $table->string('title', 128)->default('')->comment('标题');
            $table->text('note')->comment('笔记内容');
            $table->string('tags', 255)->default('')->comment('标记标签');
            $table->integer('admin_id')->default(0)->comment('书写人.id');
            $table->tinyInteger('status')->default(0)->comment('状态 1待处理 2已处理');
            $table->timestamps();

            $table->index('title');
            $table->index('admin_id');
            $table->index('status');
        }); QueryUtil::tableComment('notepads', '记事本内容表');
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('table_sundry_about');
    }
}
